<!doctype html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>个人资料</title>
	<link rel="stylesheet" type="text/css" href="<?=base_url()?>public/css/style.css">
	<script type="text/javascript" src="<?=base_url()?>public/js/jq.1.12.4.js"></script>
	<script type="text/javascript" src="<?=base_url()?>public/js/js.js"></script>
	<script>
	if ((navigator.userAgent.match(/(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone)/i))) {
		window.location.href="mobile/index";
	}
		
	</script>
<style>
.cont{
	width:100%;
	min-height:800px;
	overflow:hidden;
}
.con{
	min-height: 100%;
	margin-left:  170px;
	background-image:url(<?=base_url()?>public/img/back.jpg);
	background-size:100% 100%;
	padding:0;
	box-sizing: border-box;
	background-repeat:no-repeat;
	background:#f2fecd;
}
.content .cont_right>i{
	float:left;
	margin-top:8px;
	color:#000;
}
.content .cont .pict >ul:after{
	content:"";
	display:table;
	clear:both;
}
</style>
</head>
<body>
	<!-- 头部 -->
	<?php echo $menu ?>
	<!-- 主体 -->
	<div class="main clearfix" style='min-width:1300px;'>
		<?php echo $left ?>
		<div class="content" style='width:97%;'>
			<div class="con">
				<div class="cont" style='padding-bottom:3%;min-height:826px;'>
					<div class="cont_left" style='box-sizing:border-box;border-top:4px solid green;margin-left:0;padding-left:2%;'>
                    	<div class="pict">
                        	<ul>
                            	<a>
                                    <li class="left1" style='margin-left:18%;width:182px;height:323px;position:relative;'>
									<a href='offer_help'><i style='display:block;background:url(<?=base_url()?>public/img/333.png) no-repeat -2px -5px / 103%;width:182px;max-width:211px;height:212px;' class="setMargin"></i></a>
									<a href='income_jt/income_jt'><i style='display:block;background:url(<?=base_url()?>public/img/she-btn.jpg) no-repeat center center / 100% 100%;width:182px;height:88px;margin-top:20px'></i>
								<span class='off_money' style='position:absolute;width:100%;text-align:center;;top:78%;left:0%;height:25px;color:white;font-size:16px;'><?php echo $user['jt_money'] ?></span></li></a>
                                <a><li class="right1" style='margin-right:18%;width:182px;height:323px;position:relative;'>
									<a href='accept_help'><i style='display:block;background:url(<?=base_url()?>public/img/55552.png) no-repeat -2px -5px / 103%;width:182px;max-width:211px;height:212px;' class="setMargin"></i></a>
									<a href='income_tg/income_tg'><i style='display:block;background:url(<?=base_url()?>public/img/de-btn.jpg) no-repeat center center / 100% 100%;width:182px;height:88px;margin-top:20px'></i></a>
								<span class='acc_money' style='cursor: pointer;text-align:center;position:absolute;color:green;width:100%;text-align:center;top:78%;left:0%;height:25px;font-size:16px;'><?php echo $user['tg_money'] ?></span></li></a>
								
                            </ul>
                        </div>
                    	<table cellpadding="0" cellspacing="0" class="table1">
                        	<tr class="title">
                            	<th colspan="5">平台公益公告</th>
                            </tr>
                        	<tr style='background:#f4fed8;'>
                            	<th style='width:140px;'></th>
                                <th>标题</th>
                                <th>摘要</th>
                                <th>时间</th>
                                <th>查看</th>
                            </tr>
                            <?php 
                            foreach ($result as $rs){
                            ?>
                            <tr>
                            	<td class="one"><span><img style="width: 100px;height: 100px;" src="<?=base_url()?>uploads/<?php echo $rs['picture']; ?>"></span></td>
                            	<td><a href="articles/index?id=<?php echo $rs['id'];?>"><?php echo $rs['title'];?></a></td>
                                <td><?php echo $rs['content'];?></td>
                                <td class="number"><?php echo date("Y-m-d H:i:s",$rs['create_time']);?></td>
                                <td class="eye"><a href="articles/index?id=<?php echo $rs['id'];?>">查看</a></td>
                            </tr>
                            <?php }?>
                        </table>
                    </div>
                    <div class="cont_right" style='width:20%;background:#f2fecd;'> 
                    	<div class="title"><h1>爱&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;基金池：<?php echo $aixinchi ?></h1></div>
                        <div class="right_two">
                        	<p><span>公益账号&nbsp;:</span>&nbsp;<?php echo $user['user_account'] ?></p>
                            <p><span>会员等级&nbsp;:</span>&nbsp;<?php echo $team_lv['title'] ?>；<?php echo $lv['title'] ?></p>
						</div>
							<i style='font-weight:100;display:block;width:20%;height:19px;text-align:right;font-size:13px;font-style:normal;color:#707070;min-width:65px;margin-left:10px;'>当前积分：</i>						
							<div class="progress" style='width:25%;height:12px;float:left;margin-top:7px;border-radius:10px;box-shadow:-4px 3px 8px rgba(25,26,20,0.4);background:white;'>
								<div style='width:0%;height:12px;background:rgba(14,170,24,0.6);border-box;border-right:1px solid #ccc;float:left;border-radius:10px 0 0 10px;'></div>
							</div>
							<span style='height:14px;color:#707070;line-height:28px;font-size:12px;margin-left:5px;'>
								<?php 
								if($user['score']>700){
									echo $user['score'];
								}else{
									echo $user['score'] ;
									echo "/";
									echo $lv['score']-1;
								}
								?>
						</span>
                        
						
                        <div  class="right_two">
                        	<h1>公益排单信息</h1>
                            <p><span>公益币余额：</span><?php echo $user['public_money'] ?></p>
                        </div>
                        <div  class="right_two">
                        	<h1>提供公益帮助信息</h1>
                            <div class="green">
                                <?php if(!empty($offer)): ?>
                            	<p><span>公益编号：</span><b>
								<?php 
									echo $offer['bianhao']; 
									?></b></p>
                                <p><span>参与者：</span><b><?php echo $user['user_name'] ?></b></p>
                                <p><span>数额：</span><b><?php echo $offer['money'] ?></b></p>
                                <p><span>日期：</span><b><?php echo date('Y-m-d',$offer['create_time']) ?></b></p>
								<p><span>时间：</span><b><?php echo date('H:i:s',$offer['create_time']) ?></b></p>
                                <p><span>状态：</span><b>
								<?php 
									if ($offer['status'] == '0'){
										echo "等待中";
									} elseif($offer['status'] == '1') {
										echo "已匹配";
									} elseif($offer['status'] == '12') {
										echo "已打款";
									} elseif($offer['status'] == '13') {
										echo "交易完成";
									}
								?></b></p>
								<?php 
									$day_num =  floor( (time() - $offer['create_time'])/86400);
									$day_num = $day_num < 6 ? $day_num : 6;
								 ?>
                                <p class="yew">当前排队日回报1%，已经排单<?=$day_num?>天获得<?=$offer['money']*$day_num/100?>元回报</p>
                                <?php endif; ?>
                            </div>
                        </div>
                        <div  class="right_two">
                        	<h1 style='color:#254e01;'>接受公益帮助信息</h1>
                                <?php if(!empty($accept)): ?>
                                <?php foreach($accept AS $v): ?>
                            <div class="green right-tow-js2" style="background-color:#f0ff8e;">
                            	<p style='color:#6cb328 !important;'><span style='color:#6cb328'>公益编号：</span><b style='color:#6cb328'><?php echo $v['gy_bianhao'] ?></b></p>
                                <p style='color:#6cb328 !important;'><span style='color:#6cb328'>参与者：</span><b style='color:#6cb328'><?php echo $user['user_name'] ?></b></p>
                                <p style='color:#6cb328 !important;'><span style='color:#6cb328'>数额：</span><b style='color:#6cb328'><?php echo $v['money'] ?></b></p>
                                <p style='color:#6cb328 !important;'><span style='color:#6cb328'>日期：</span><b style='color:#6cb328'><?php echo date('Y-m-d',$v['create_time']) ?></b></p>
								<p style='color:#6cb328 !important;'><span style='color:#6cb328'>时间：</span><b style='color:#6cb328'><?php echo date('H:i:s',$v['create_time']) ?></b></p>
                                <p style='color:#6cb328 !important;'><span style='color:#6cb328'>状态：</span><b style='color:#6cb328'>
								<?php 
									if ($v['status'] == '0'){
										echo "等待中";
									} elseif($v['status'] == '1') {
										echo "已匹配";
									} elseif($v['status'] == '12') {
										echo "已完成";
									}
								?>
								</b></p>
                                <!-- <p class="yew">我愿意0天后接受匹配</p> -->
                            </div>
								<?php endforeach; ?>
                                <?php else: ?>
                                	<div class="green right-tow-js2" style="background-color:#f0ff8e;">
                            	
                                <!-- <p class="yew">我愿意0天后接受匹配</p> -->
                            </div>
                                <?php endif; ?>
                        </div>
                    </div>
				</div>
			</div>
		</div>
	</div>
<script type="text/javascript">
    $(function(){
        var arr=$(".clearfix .content .cont_right>span").html().split("/");
        var count=arr[0];
        var total=arr[1];
        <?php if ($user['score']>700){ ?>
        $(".clearfix .content .cont_right .progress>div").css("width","100%");
        $(".clearfix .content .cont_right .progress>div").css("border-radius","10px");
		<?php }else{?>
        $(".clearfix .content .cont_right .progress>div").css("width",count/total*100+"%");
		<?php }?>
		
		var progressWidth=$(".progress>div").css("width").slice(0,1);
		if(progressWidth==0){
			$(".progress>div").hide();
		}
		$(".setMargin").each(function(i){
			var parentWidth=parseInt($(this).parent().css("width"));
			console.log(parentWidth+"----"+$(this).css("width"));
			$(this).css("margin-left",(parentWidth-parseInt($(this).css("width")))/2+"px");
		});
	});
</script>

</body>
</html>